<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport"
          content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no"/>
    <title>商家列表</title>
    <link rel="stylesheet" type="text/css" href="../css/aui.css"/>
    <link rel="stylesheet" type="text/css" href="../css/aui-indexed-list.css"/>
    <style>
        body {
            background-color: #f3f3f3;
            font-size: 13px;
        }

        .aui-indexed-list-bar {
            top: 65px;
        }

        /*实力商家*/

        .w20 {
            width: 20%;
        }

        .zfTitle {
            padding: 8px 10px;
        }

        .shili .aui-list-view.aui-grid-view .aui-list-view-cell .aui-img-body {
            padding: 18px 0;
        }

        .shili .aui-list-view.aui-grid-view {
            padding-bottom: 5px;
        }

        .shili .aui-list-view-cell {
            float: left;
            width: 100%;
        }

        /*列表*/
        .aui-indexed-list-view li.aui-list-view-cell img {
            width: 40px;
            height: 40px;
            line-height: 40px;
            margin-right: 8px;
            vertical-align: middle;
        }

        .aui-list-view-cell {
            padding: 6px 15px;
        }
        .aui-indexed-list{
            top: 0;
            width: 100%;
        }
    </style>
</head>
<body>
<div class="aui-indexed-list">
    <div class="shili bgWhite">
        <ul class="aui-list-view aui-indexed-list-view aui-in" data-group="*" id="Brand-content">
            <li class="aui-list-view-cell">
                <img class="aui-img-object" src="../image/shili.jpg">张三
            </li>
            <li class="aui-list-view-cell">
                <img class="aui-img-object" src="../image/shili.jpg">张三
            </li>
            <li class="aui-list-view-cell">
                <img class="aui-img-object" src="../image/shili.jpg">张三
            </li>
        </ul>
    </div>
</div>

</body>
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript" src="../script/aui-indexed-list.js"></script>
<script type="text/javascript" src="../script/common.js"></script>
<script type="text/javascript" src="../script/doT.min.js"></script>
<script type="text/javascript">
    apiready = function () {
        showLoading();
        api.parseTapmode();
        var appVersion = api.appVersion;
        $api.text($api.byId('version'), appVersion);
        var url = 'brand/brandall';
        ajaxRequest(url, 'get', '', function (ret, err) {
            hideLoading();
            if (ret.status == 1) {
                var content = $api.byId('Brand-content');
                var tpl = $api.byId('Brand-template').text;
                var tempFn = doT.template(tpl);
                $api.html(content, '');
                $api.prepend(content, tempFn(ret.brand));
                var content = $api.byId('recommend-content');
                var tpl = $api.byId('recommend-template').text;
                var tempFn = doT.template(tpl);
                $api.html(content, '');
                $api.prepend(content, tempFn(ret.recommend));
            } else {
                api.toast({
                    msg: '网络错误',
                    duration: 2000,
                    location: 'bottom'
                });
            }
        })
    }
</script>
</html>